package com.atguigu.gmall.item.controller;


import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.item.feign.SpuFeignClient;
import com.atguigu.gmall.model.product.SpuInfo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SkuInfoController {

    @Autowired
    SpuFeignClient spuFeignClient;

    @GetMapping("/hello")
    public Result<Page<SpuInfo>> hello(){

        //feign自动远程调用
        Result<Page<SpuInfo>> pageResult = spuFeignClient.spuInfoPageList(61L,
                1L, 5L);
        return pageResult;
    }


}
